decorative banner

Folder getFiles() Method


    Folder.getFiles(mask)

Description

    The Folder getFiles() method returns a list of File and Folder objects contained in the folder object. The mask paramter is the search mask for the file names, expressed as a string. It may contain question marks and asterisks and is preset to * to find all files.

    Alternatively, a function may be supplied . This function is called with a File or Folder object for every file or folder in the directory search. If the function returns true, the object is added to the array.

    On Windows, all aliases end with the extension ".lnk". This extension is stripped from the file name when found to preserve compatibility with other operating systems. You can, however, search for all aliases by supplying the search mask "*.lnk". This is NOT recommended, however, because it is not portable.

Parameters

    mask

    String

    search mask for the files names (see above)

Returns

    Array of File & Folder objects or null if the folder does not exist.